INSERT
INTO
c1_wf_task
(<#assign prefixName = true>
<#if (insert_batchNo??) && (insert_batchNo_value??)>
${prefixName?string('  ', ', ')}batch_no
<#assign prefixName = false>
</#if>
<#if (insert_beginDate??) && (insert_beginDate_value??)>
${prefixName?string('  ', ', ')}begin_date
<#assign prefixName = false>
</#if>
<#if (insert_beginTime??) && (insert_beginTime_value??)>
${prefixName?string('  ', ', ')}begin_time
<#assign prefixName = false>
</#if>
<#if (insert_businessCode??) && (insert_businessCode_value??)>
${prefixName?string('  ', ', ')}business_code
<#assign prefixName = false>
</#if>
<#if (insert_businessId??) && (insert_businessId_value??)>
${prefixName?string('  ', ', ')}business_id
<#assign prefixName = false>
</#if>
<#if (insert_businessTypeCode??) && (insert_businessTypeCode_value??)>
${prefixName?string('  ', ', ')}business_type_code
<#assign prefixName = false>
</#if>
<#if (insert_createdByCode??) && (insert_createdByCode_value??)>
${prefixName?string('  ', ', ')}created_by_code
<#assign prefixName = false>
</#if>
<#if (insert_createdById??) && (insert_createdById_value??)>
${prefixName?string('  ', ', ')}created_by_id
<#assign prefixName = false>
</#if>
<#if (insert_createdDate??) && (insert_createdDate_value??)>
${prefixName?string('  ', ', ')}created_date
<#assign prefixName = false>
</#if>
<#if (insert_dataStateCode??) && (insert_dataStateCode_value??)>
${prefixName?string('  ', ', ')}data_state_code
<#assign prefixName = false>
</#if>
<#if (insert_departmentCode??) && (insert_departmentCode_value??)>
${prefixName?string('  ', ', ')}department_code
<#assign prefixName = false>
</#if>
<#if (insert_endDate??) && (insert_endDate_value??)>
${prefixName?string('  ', ', ')}end_date
<#assign prefixName = false>
</#if>
<#if (insert_endTime??) && (insert_endTime_value??)>
${prefixName?string('  ', ', ')}end_time
<#assign prefixName = false>
</#if>
<#if (insert_errorDate??) && (insert_errorDate_value??)>
${prefixName?string('  ', ', ')}error_date
<#assign prefixName = false>
</#if>
<#if (insert_errorMessage??) && (insert_errorMessage_value??)>
${prefixName?string('  ', ', ')}error_message
<#assign prefixName = false>
</#if>
<#if (insert_flagCode??) && (insert_flagCode_value??)>
${prefixName?string('  ', ', ')}flag_code
<#assign prefixName = false>
</#if>
<#if (insert_flagObjectCode??) && (insert_flagObjectCode_value??)>
${prefixName?string('  ', ', ')}flag_object_code
<#assign prefixName = false>
</#if>
<#if (insert_handleCode??) && (insert_handleCode_value??)>
${prefixName?string('  ', ', ')}handle_code
<#assign prefixName = false>
</#if>
<#if (insert_jsonData??) && (insert_jsonData_value??)>
${prefixName?string('  ', ', ')}json_data
<#assign prefixName = false>
</#if>
<#if (insert_lastModifiedByCode??) && (insert_lastModifiedByCode_value??)>
${prefixName?string('  ', ', ')}last_modified_by_code
<#assign prefixName = false>
</#if>
<#if (insert_lastModifiedById??) && (insert_lastModifiedById_value??)>
${prefixName?string('  ', ', ')}last_modified_by_id
<#assign prefixName = false>
</#if>
<#if (insert_lastModifiedDate??) && (insert_lastModifiedDate_value??)>
${prefixName?string('  ', ', ')}last_modified_date
<#assign prefixName = false>
</#if>
<#if (insert_lastRetryDate??) && (insert_lastRetryDate_value??)>
${prefixName?string('  ', ', ')}last_retry_date
<#assign prefixName = false>
</#if>
<#if (insert_nextRetryTime??) && (insert_nextRetryTime_value??)>
${prefixName?string('  ', ', ')}next_retry_time
<#assign prefixName = false>
</#if>
<#if (insert_orderBy??) && (insert_orderBy_value??)>
${prefixName?string('  ', ', ')}order_by_
<#assign prefixName = false>
</#if>
<#if (insert_orgCode??) && (insert_orgCode_value??)>
${prefixName?string('  ', ', ')}org_code
<#assign prefixName = false>
</#if>
<#if (insert_personalCode??) && (insert_personalCode_value??)>
${prefixName?string('  ', ', ')}personal_code
<#assign prefixName = false>
</#if>
<#if (insert_personalId??) && (insert_personalId_value??)>
${prefixName?string('  ', ', ')}personal_id
<#assign prefixName = false>
</#if>
<#if (insert_retryCount??) && (insert_retryCount_value??)>
${prefixName?string('  ', ', ')}retry_count
<#assign prefixName = false>
</#if>
<#if (insert_retryCountUpperLimit??) && (insert_retryCountUpperLimit_value??)>
${prefixName?string('  ', ', ')}retry_count_upper_limit
<#assign prefixName = false>
</#if>
<#if (insert_siteCode??) && (insert_siteCode_value??)>
${prefixName?string('  ', ', ')}site_code
<#assign prefixName = false>
</#if>
<#if (insert_stateCode??) && (insert_stateCode_value??)>
${prefixName?string('  ', ', ')}state_code
<#assign prefixName = false>
</#if>
<#if (insert_systemInfoCode??) && (insert_systemInfoCode_value??)>
${prefixName?string('  ', ', ')}system_info_code
<#assign prefixName = false>
</#if>
<#if (insert_version??) && (insert_version_value??)>
${prefixName?string('  ', ', ')}version_
<#assign prefixName = false>
</#if>
<#if (insert_wfTaskId??) && (insert_wfTaskId_value??)>
${prefixName?string('  ', ', ')}wf_task_id
<#assign prefixName = false>
</#if>
<#if (insert_yyyy??) && (insert_yyyy_value??)>
${prefixName?string('  ', ', ')}yyyy
<#assign prefixName = false>
</#if>
<#if (insert_yyyyMm??) && (insert_yyyyMm_value??)>
${prefixName?string('  ', ', ')}yyyy_mm
<#assign prefixName = false>
</#if>
<#if (insert_yyyyMmDd??) && (insert_yyyyMmDd_value??)>
${prefixName?string('  ', ', ')}yyyy_mm_dd
<#assign prefixName = false>
</#if>
)
(SELECT
<#assign prefixName = true>
<#if (insert_batchNo??) && (insert_batchNo_value??)>
${prefixName?string('  ', ', ')}:insert_batchNo_value
<#assign prefixName = false>
</#if>
<#if (insert_beginDate??) && (insert_beginDate_value??)>
${prefixName?string('  ', ', ')}:insert_beginDate_value
<#assign prefixName = false>
</#if>
<#if (insert_beginTime??) && (insert_beginTime_value??)>
${prefixName?string('  ', ', ')}:insert_beginTime_value
<#assign prefixName = false>
</#if>
<#if (insert_businessCode??) && (insert_businessCode_value??)>
${prefixName?string('  ', ', ')}:insert_businessCode_value
<#assign prefixName = false>
</#if>
<#if (insert_businessId??) && (insert_businessId_value??)>
${prefixName?string('  ', ', ')}:insert_businessId_value
<#assign prefixName = false>
</#if>
<#if (insert_businessTypeCode??) && (insert_businessTypeCode_value??)>
${prefixName?string('  ', ', ')}:insert_businessTypeCode_value
<#assign prefixName = false>
</#if>
<#if (insert_createdByCode??) && (insert_createdByCode_value??)>
${prefixName?string('  ', ', ')}:insert_createdByCode_value
<#assign prefixName = false>
</#if>
<#if (insert_createdById??) && (insert_createdById_value??)>
${prefixName?string('  ', ', ')}:insert_createdById_value
<#assign prefixName = false>
</#if>
<#if (insert_createdDate??) && (insert_createdDate_value??)>
${prefixName?string('  ', ', ')}:insert_createdDate_value
<#assign prefixName = false>
</#if>
<#if (insert_dataStateCode??) && (insert_dataStateCode_value??)>
${prefixName?string('  ', ', ')}:insert_dataStateCode_value
<#assign prefixName = false>
</#if>
<#if (insert_departmentCode??) && (insert_departmentCode_value??)>
${prefixName?string('  ', ', ')}:insert_departmentCode_value
<#assign prefixName = false>
</#if>
<#if (insert_endDate??) && (insert_endDate_value??)>
${prefixName?string('  ', ', ')}:insert_endDate_value
<#assign prefixName = false>
</#if>
<#if (insert_endTime??) && (insert_endTime_value??)>
${prefixName?string('  ', ', ')}:insert_endTime_value
<#assign prefixName = false>
</#if>
<#if (insert_errorDate??) && (insert_errorDate_value??)>
${prefixName?string('  ', ', ')}:insert_errorDate_value
<#assign prefixName = false>
</#if>
<#if (insert_errorMessage??) && (insert_errorMessage_value??)>
${prefixName?string('  ', ', ')}:insert_errorMessage_value
<#assign prefixName = false>
</#if>
<#if (insert_flagCode??) && (insert_flagCode_value??)>
${prefixName?string('  ', ', ')}:insert_flagCode_value
<#assign prefixName = false>
</#if>
<#if (insert_flagObjectCode??) && (insert_flagObjectCode_value??)>
${prefixName?string('  ', ', ')}:insert_flagObjectCode_value
<#assign prefixName = false>
</#if>
<#if (insert_handleCode??) && (insert_handleCode_value??)>
${prefixName?string('  ', ', ')}:insert_handleCode_value
<#assign prefixName = false>
</#if>
<#if (insert_jsonData??) && (insert_jsonData_value??)>
${prefixName?string('  ', ', ')}:insert_jsonData_value
<#assign prefixName = false>
</#if>
<#if (insert_lastModifiedByCode??) && (insert_lastModifiedByCode_value??)>
${prefixName?string('  ', ', ')}:insert_lastModifiedByCode_value
<#assign prefixName = false>
</#if>
<#if (insert_lastModifiedById??) && (insert_lastModifiedById_value??)>
${prefixName?string('  ', ', ')}:insert_lastModifiedById_value
<#assign prefixName = false>
</#if>
<#if (insert_lastModifiedDate??) && (insert_lastModifiedDate_value??)>
${prefixName?string('  ', ', ')}:insert_lastModifiedDate_value
<#assign prefixName = false>
</#if>
<#if (insert_lastRetryDate??) && (insert_lastRetryDate_value??)>
${prefixName?string('  ', ', ')}:insert_lastRetryDate_value
<#assign prefixName = false>
</#if>
<#if (insert_nextRetryTime??) && (insert_nextRetryTime_value??)>
${prefixName?string('  ', ', ')}:insert_nextRetryTime_value
<#assign prefixName = false>
</#if>
<#if (insert_orderBy??) && (insert_orderBy_value??)>
${prefixName?string('  ', ', ')}:insert_orderBy_value
<#assign prefixName = false>
</#if>
<#if (insert_orgCode??) && (insert_orgCode_value??)>
${prefixName?string('  ', ', ')}:insert_orgCode_value
<#assign prefixName = false>
</#if>
<#if (insert_personalCode??) && (insert_personalCode_value??)>
${prefixName?string('  ', ', ')}:insert_personalCode_value
<#assign prefixName = false>
</#if>
<#if (insert_personalId??) && (insert_personalId_value??)>
${prefixName?string('  ', ', ')}:insert_personalId_value
<#assign prefixName = false>
</#if>
<#if (insert_retryCount??) && (insert_retryCount_value??)>
${prefixName?string('  ', ', ')}:insert_retryCount_value
<#assign prefixName = false>
</#if>
<#if (insert_retryCountUpperLimit??) && (insert_retryCountUpperLimit_value??)>
${prefixName?string('  ', ', ')}:insert_retryCountUpperLimit_value
<#assign prefixName = false>
</#if>
<#if (insert_siteCode??) && (insert_siteCode_value??)>
${prefixName?string('  ', ', ')}:insert_siteCode_value
<#assign prefixName = false>
</#if>
<#if (insert_stateCode??) && (insert_stateCode_value??)>
${prefixName?string('  ', ', ')}:insert_stateCode_value
<#assign prefixName = false>
</#if>
<#if (insert_systemInfoCode??) && (insert_systemInfoCode_value??)>
${prefixName?string('  ', ', ')}:insert_systemInfoCode_value
<#assign prefixName = false>
</#if>
<#if (insert_version??) && (insert_version_value??)>
${prefixName?string('  ', ', ')}:insert_version_value
<#assign prefixName = false>
</#if>
<#if (insert_wfTaskId??) && (insert_wfTaskId_value??)>
${prefixName?string('  ', ', ')}:insert_wfTaskId_value
<#assign prefixName = false>
</#if>
<#if (insert_yyyy??) && (insert_yyyy_value??)>
${prefixName?string('  ', ', ')}:insert_yyyy_value
<#assign prefixName = false>
</#if>
<#if (insert_yyyyMm??) && (insert_yyyyMm_value??)>
${prefixName?string('  ', ', ')}:insert_yyyyMm_value
<#assign prefixName = false>
</#if>
<#if (insert_yyyyMmDd??) && (insert_yyyyMmDd_value??)>
${prefixName?string('  ', ', ')}:insert_yyyyMmDd_value
<#assign prefixName = false>
</#if>
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM c1_wf_task E
<#assign prefixName = true>
<#if (where_and_eq_batchNo??)>
<#if (where_and_eq_batchNo_value??)>
${prefixName?string('WHERE ', 'AND ')}E.batch_no = :where_and_eq_batchNo_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.batch_no IS NULL OR E.batch_no = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_beginDate??)>
<#if (where_and_eq_beginDate_value??)>
${prefixName?string('WHERE ', 'AND ')}E.begin_date = :where_and_eq_beginDate_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.begin_date IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_beginTime??)>
<#if (where_and_eq_beginTime_value??)>
${prefixName?string('WHERE ', 'AND ')}E.begin_time = :where_and_eq_beginTime_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.begin_time IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_businessCode??)>
<#if (where_and_eq_businessCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.business_code = :where_and_eq_businessCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.business_code IS NULL OR E.business_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_businessId??)>
<#if (where_and_eq_businessId_value??)>
${prefixName?string('WHERE ', 'AND ')}E.business_id = :where_and_eq_businessId_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.business_id IS NULL OR E.business_id = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_businessTypeCode??)>
<#if (where_and_eq_businessTypeCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.business_type_code = :where_and_eq_businessTypeCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.business_type_code IS NULL OR E.business_type_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_createdByCode??)>
<#if (where_and_eq_createdByCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.created_by_code = :where_and_eq_createdByCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.created_by_code IS NULL OR E.created_by_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_createdById??)>
<#if (where_and_eq_createdById_value??)>
${prefixName?string('WHERE ', 'AND ')}E.created_by_id = :where_and_eq_createdById_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.created_by_id IS NULL OR E.created_by_id = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_createdDate??)>
<#if (where_and_eq_createdDate_value??)>
${prefixName?string('WHERE ', 'AND ')}E.created_date = :where_and_eq_createdDate_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.created_date IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_dataStateCode??)>
<#if (where_and_eq_dataStateCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.data_state_code = :where_and_eq_dataStateCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.data_state_code IS NULL OR E.data_state_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_departmentCode??)>
<#if (where_and_eq_departmentCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.department_code = :where_and_eq_departmentCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.department_code IS NULL OR E.department_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_endDate??)>
<#if (where_and_eq_endDate_value??)>
${prefixName?string('WHERE ', 'AND ')}E.end_date = :where_and_eq_endDate_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.end_date IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_endTime??)>
<#if (where_and_eq_endTime_value??)>
${prefixName?string('WHERE ', 'AND ')}E.end_time = :where_and_eq_endTime_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.end_time IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_errorDate??)>
<#if (where_and_eq_errorDate_value??)>
${prefixName?string('WHERE ', 'AND ')}E.error_date = :where_and_eq_errorDate_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.error_date IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_errorMessage??)>
<#if (where_and_eq_errorMessage_value??)>
${prefixName?string('WHERE ', 'AND ')}E.error_message = :where_and_eq_errorMessage_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.error_message IS NULL OR E.error_message = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_flagCode??)>
<#if (where_and_eq_flagCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.flag_code = :where_and_eq_flagCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.flag_code IS NULL OR E.flag_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_flagObjectCode??)>
<#if (where_and_eq_flagObjectCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.flag_object_code = :where_and_eq_flagObjectCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.flag_object_code IS NULL OR E.flag_object_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_handleCode??)>
<#if (where_and_eq_handleCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.handle_code = :where_and_eq_handleCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.handle_code IS NULL OR E.handle_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_jsonData??)>
<#if (where_and_eq_jsonData_value??)>
${prefixName?string('WHERE ', 'AND ')}E.json_data = :where_and_eq_jsonData_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.json_data IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_lastModifiedByCode??)>
<#if (where_and_eq_lastModifiedByCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.last_modified_by_code = :where_and_eq_lastModifiedByCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.last_modified_by_code IS NULL OR E.last_modified_by_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_lastModifiedById??)>
<#if (where_and_eq_lastModifiedById_value??)>
${prefixName?string('WHERE ', 'AND ')}E.last_modified_by_id = :where_and_eq_lastModifiedById_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.last_modified_by_id IS NULL OR E.last_modified_by_id = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_lastModifiedDate??)>
<#if (where_and_eq_lastModifiedDate_value??)>
${prefixName?string('WHERE ', 'AND ')}E.last_modified_date = :where_and_eq_lastModifiedDate_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.last_modified_date IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_lastRetryDate??)>
<#if (where_and_eq_lastRetryDate_value??)>
${prefixName?string('WHERE ', 'AND ')}E.last_retry_date = :where_and_eq_lastRetryDate_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.last_retry_date IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_nextRetryTime??)>
<#if (where_and_eq_nextRetryTime_value??)>
${prefixName?string('WHERE ', 'AND ')}E.next_retry_time = :where_and_eq_nextRetryTime_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.next_retry_time IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_orderBy??)>
<#if (where_and_eq_orderBy_value??)>
${prefixName?string('WHERE ', 'AND ')}E.order_by_ = :where_and_eq_orderBy_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.order_by_ IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_orgCode??)>
<#if (where_and_eq_orgCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.org_code = :where_and_eq_orgCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.org_code IS NULL OR E.org_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_personalCode??)>
<#if (where_and_eq_personalCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.personal_code = :where_and_eq_personalCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.personal_code IS NULL OR E.personal_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_personalId??)>
<#if (where_and_eq_personalId_value??)>
${prefixName?string('WHERE ', 'AND ')}E.personal_id = :where_and_eq_personalId_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.personal_id IS NULL OR E.personal_id = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_retryCount??)>
<#if (where_and_eq_retryCount_value??)>
${prefixName?string('WHERE ', 'AND ')}E.retry_count = :where_and_eq_retryCount_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.retry_count IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_retryCountUpperLimit??)>
<#if (where_and_eq_retryCountUpperLimit_value??)>
${prefixName?string('WHERE ', 'AND ')}E.retry_count_upper_limit = :where_and_eq_retryCountUpperLimit_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.retry_count_upper_limit IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_siteCode??)>
<#if (where_and_eq_siteCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.site_code = :where_and_eq_siteCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.site_code IS NULL OR E.site_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_stateCode??)>
<#if (where_and_eq_stateCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.state_code = :where_and_eq_stateCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.state_code IS NULL OR E.state_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_systemInfoCode??)>
<#if (where_and_eq_systemInfoCode_value??)>
${prefixName?string('WHERE ', 'AND ')}E.system_info_code = :where_and_eq_systemInfoCode_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.system_info_code IS NULL OR E.system_info_code = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_version??)>
<#if (where_and_eq_version_value??)>
${prefixName?string('WHERE ', 'AND ')}E.version_ = :where_and_eq_version_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.version_ IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_wfTaskId??)>
<#if (where_and_eq_wfTaskId_value??)>
${prefixName?string('WHERE ', 'AND ')}E.wf_task_id = :where_and_eq_wfTaskId_value
<#else>
${prefixName?string('WHERE ', 'AND ')}(E.wf_task_id IS NULL OR E.wf_task_id = '')
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_yyyy??)>
<#if (where_and_eq_yyyy_value??)>
${prefixName?string('WHERE ', 'AND ')}E.yyyy = :where_and_eq_yyyy_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.yyyy IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_yyyyMm??)>
<#if (where_and_eq_yyyyMm_value??)>
${prefixName?string('WHERE ', 'AND ')}E.yyyy_mm = :where_and_eq_yyyyMm_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.yyyy_mm IS NULL
</#if>
<#assign prefixName = false>
</#if>
<#if (where_and_eq_yyyyMmDd??)>
<#if (where_and_eq_yyyyMmDd_value??)>
${prefixName?string('WHERE ', 'AND ')}E.yyyy_mm_dd = :where_and_eq_yyyyMmDd_value
<#else>
${prefixName?string('WHERE ', 'AND ')}E.yyyy_mm_dd IS NULL
</#if>
<#assign prefixName = false>
</#if>
))